#include "widget.h"
#include "ui_widget.h"
#include <QSound>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    QSound* sound = new QSound("C:\\Users\\14725\\Desktop\\苹果香.wav",this);
    connect(ui->pushButton,&QPushButton::clicked,[=](){
        sound->play();
    });
}

Widget::~Widget()
{
    delete ui;
}

